home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_497 / nlcalc / source / csetup.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  1KB  |  53 lines

  1. /*
  2.  *  CALC      Provides a calculator that opens on the active screen when
  3.  *            you press a specific key sequence.  Otherwise, the program
  4.  *            waits quitely in the background.
  5.  *
  6.  *              Copyright 1989 by Davide P. Cervone.
  7.  *  You may use this code, provided this copyright notice is kept intact.
  8.  */
  9.  
  10. #define PORTNAME    "CalcPort"
  11.  
  12. #define STARTSIGNAL         SIGBREAKF_CTRL_F
  13. #define ENDSIGNAL           SIGBREAKF_CTRL_E
  14.  
  15. #define CLOSESIGNAL         SIGBREAKF_CTRL_D
  16.  
  17.  
  18. struct HandlerData
  19. {
  20.    struct MsgPort HandlerPort;
  21.    short  MajVers,MinVers,MinLoadVers;
  22.    long   Segment;
  23.  
  24.    struct IntuitionBase         **IntuitionBase;
  25.    struct GfxBase               **GfxBase;
  26.  
  27.    struct Interrupt *Handler_Interrupt;
  28.    struct Task **ParentTask;
  29.    
  30.    UWORD *KeyCode;
  31.    UWORD *Qualifiers;
  32.  
  33.    void             (*aCloseScreen)();
  34.    long             *OldCloseScreen;
  35. };
  36.  
  37.  
  38. /*
  39.  *  Macros to make using HandlerData easy
  40.  */
  41.  
  42. #define VAR(x)      (*(cHandlerData->x))
  43. #define var(x)      (cHandlerData->x)
  44.  
  45.  
  46. struct StartupMessage
  47. {
  48.    struct Message sm_Message;
  49.    struct HandlerData *sm_HandlerData;
  50.    struct Task *sm_ParentTask;
  51.    short sm_LoadVers;
  52. };
  53.